﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Search.aspx.cs" Inherits="FHost1.FormSearch" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#MainContent_btnSearch").button();
        });
    
    </script>
    <div style="width: 90%; margin: 10px;">
        <h2>
            Search Files ...</h2>
        <br />
        <asp:TextBox ID="txtSearch" Width="500px" CssClass="searchtxt ui-accordion ui-corner-all"
            runat="server"></asp:TextBox><asp:DropDownList ID="ddlSearch" Width="100px" CssClass="searchddl ui-accordion ui-corner-all"
                runat="server">
                <asp:ListItem Value="0">All files</asp:ListItem>
                <asp:ListItem Value="1">Video</asp:ListItem>
                <asp:ListItem Value="2">Music</asp:ListItem>
                <asp:ListItem Value="3">Photo</asp:ListItem>
                <asp:ListItem Value="4">Documents</asp:ListItem>
                <asp:ListItem Value="9">Other</asp:ListItem>
            </asp:DropDownList>
        &nbsp;
        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
        <br />
        <hr />
        <div class="ui-widget ui-corner-all" style="margin-left:50px;padding:10px;">
        <asp:DataList ID="GridSearchResult" runat="server" Font-Size="12px" Width="600px">
            <ItemTemplate>
                <div >
                    <a href='DownloadHandler.ashx?id=<%# DataBinder.Eval(Container.DataItem, "FileID") %>' target="_blank">
                        <%# DataBinder.Eval(Container.DataItem, "Title") %></a>
                    <br />
                    <br />
                    <span style="float:right;">Uploaded By: <%# DataBinder.Eval(Container.DataItem, "FullName")%></span>&nbsp;&nbsp;
                    <span>Type: <%# DataBinder.Eval(Container.DataItem, "FileExt")%></span></div>
                    <hr />
            </ItemTemplate>
        </asp:DataList>
        </div>
    </div>
</asp:Content>
